package com.mf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mf.entity.Description;
import com.mf.mapper.DescriptionMapper;
import com.mf.service.IDescriptionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 数据字典 服务实现类
 * </p>
 *
 * @author mf
 * @since 2024-05-16
 */
@Service
public class DescriptionServiceImpl extends ServiceImpl<DescriptionMapper, Description> implements IDescriptionService {
    @Resource
    private DescriptionMapper descriptionMapper;

    @Override
    public List<Description> findDescriptionById(int pid) {
        LambdaQueryWrapper<Description> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Description::getPid,pid);
        return descriptionMapper.selectList(queryWrapper);
    }
}
